home *** CD-ROM | disk | FTP | other *** search
-
- // JavaScript wrapper for r3prglng.h
- // Auto generated file, do not modify by hand
- // Copyright ⌐ 2004, Realsoft Graphics Oy
-
- var R3_PRGLNG_H = 1;
- include("oops/r3root.js")
- include("oops/r3vector.js")
- include("oops/r3color.js")
- include("oops/r3coords.js")
- include("oops/r3matrix.js")
-
-
- var R3CLID_PRGLNG = 260;
-
-
-
-
- // Description: Run a given program.
- // Returns: Boolean, true if succeeded
- // p3: String, pointer to null terminated string containing the program to be executed
-
- R3PLM_INTERP = 260000;
-
- function mR3PLM_INTERP(p3) {
- return DoA(this.r3obj, 260000, p3, R3TID_STRING, 0);
- }
-
- // Description: Evaluate an expression
- // Virtual method
- // Returns: Boolean, TRUE if evaluation succeeded
- // p1: Number, address for result
- // p3: String, Expression to be evaluated
-
- R3PLM_EVAL = 260001;
-
- function mR3PLM_EVAL(p1, p3) {
- return DoA2(this.r3obj, 260001, p1, R3TID_FLOAT, 0, p3, R3TID_STRING, 0);
- }
-
- // Description: Print out a message to the user
- // p1: String, format string
- // p3: Object, parameter corresponding the format string.
-
- R3PLM_PRINT = 260002;
-
- function mR3PLM_PRINT(p1, p3) {
- DoA2(this.r3obj, 260002, p1, R3TID_STRING, 0, p3, R3TID_OBJECT, 0);
- }
-
- // Description: The base class provides a mechanism for keeping track of installed languages. A new
- // language can register to the base class using this method.
- // Returns: Boolean, TRUE if succesfully registered.
- // p1: Integer, class id of the new language
- // p2: String, symbolic name for the language
- // p3: String, file name extension
-
- R3CPLM_REGISTERLANGUAGE = 260003;
-
- function mR3CPLM_REGISTERLANGUAGE(p1, p2, p3) {
- return DoA3(this.r3obj, 260003, p1, R3TID_INTEGER, 0, p2, R3TID_STRING, 0, p3, R3TID_STRING, 0);
- }
-
- // Description: Enumerates registered languages
- // Returns: Integer, return value from the callback
- // p1: Object, callback object
- // p2: Integer, callback method
- // p3: Object, user data
-
- R3CPLM_ENUMLANGUAGES = 260004;
-
- function mR3CPLM_ENUMLANGUAGES(p1, p2, p3) {
- return DoA3(this.r3obj, 260004, p1, R3TID_OBJECT, 0, p2, R3TID_INTEGER, 0, p3, R3TID_OBJECT, 0);
- }
-
- // Description: Define a new variable.
- // Virtual method
- // Returns: Boolean, TRUE if succeeded
- // p3: String, name of variable
-
- R3PLM_DEFINEVAR = 260005;
-
- function mR3PLM_DEFINEVAR(p3) {
- return DoA(this.r3obj, 260005, p3, R3TID_STRING, 0);
- }
-
- // Description: Set a variable to value
- // Virtual method
- // Returns: Boolean, TRUE if setting succeeded
- // p2: String, name of variable
- // p3: Object, Value for the variable to be set, If sizeof(val) <= sizeof(R3INT) passed by value.
- // If bigger, passed by reference.
-
- R3PLM_SETVAR = 260006;
-
- function mR3PLM_SETVAR(p2, p3) {
- return DoA3(this.r3obj, 260006, 0, R3TID_INTEGER, 0, p2, R3TID_STRING, 0, p3, R3TID_OBJECT, 0);
- }
-
- // Description: Fetch value of given variable
- // Virtual method
- // Returns: Boolean, true if found
- // p2: String, name of the variable
- // p3: Object, buffer for the variable value to be fetched
-
- R3PLM_GETVAR = 260007;
-
- function mR3PLM_GETVAR(p2, p3) {
- return DoA3(this.r3obj, 260007, 0, R3TID_INTEGER, 0, p2, R3TID_STRING, 0, p3, R3TID_OBJECT, 0);
- }
-
- // Description: Load and execute a script
- // Returns: Boolean, true if succeeded
- // p3: String, file name
-
- R3PLM_LOAD = 260008;
-
- function mR3PLM_LOAD(p3) {
- return DoA(this.r3obj, 260008, p3, R3TID_STRING, 0);
- }
-
- // Description: Error has occurred, terminate execution and prompt error message
- // p3: String, error message
-
- R3PLM_ERROR = 260010;
-
- function mR3PLM_ERROR(p3) {
- DoA(this.r3obj, 260010, p3, R3TID_STRING, 0);
- }
-
- // Description: Make the given object the 'current working object'.
- // Returns: Boolean, true if succeeded.
- // p3: String, name of the object
-
- R3PLM_MAKECURRENT = 260011;
-
- function mR3PLM_MAKECURRENT(p3) {
- return DoA(this.r3obj, 260011, p3, R3TID_STRING, 0);
- }
-
- // Description: Set public attribute
- // Returns: Object, objec referred by 'name' parameter or NULL if the name couldn't been resolved.
- // p1: String, name of the attribute to be fetched
-
- R3PLM_GETPUBATTR = 260012;
-
- function mR3PLM_GETPUBATTR(p1) {
- return R3ToJS( DoA2(this.r3obj, 260012, p1, R3TID_STRING, 0, 0, R3TID_INTEGER, 0));
- }
-
- // Description: Set public attribute.
- // Returns: Object, object whose attribute was set or NULL if the name could not been resolved.
- // p1: String, name of the attribute to be set
-
- R3PLM_SETPUBATTR = 260013;
-
- function mR3PLM_SETPUBATTR(p1) {
- return R3ToJS( DoA2(this.r3obj, 260013, p1, R3TID_STRING, 0, 0, R3TID_INTEGER, 0));
- }
-
- // Description: List public attributes defined by given object
- // Returns: Boolean, true if object rerefred by 'name' was found
- // p3: String, name of the object
-
- R3PLM_LISTPUBATTRS = 260014;
-
- function mR3PLM_LISTPUBATTRS(p3) {
- return DoA(this.r3obj, 260014, p3, R3TID_STRING, 0);
- }
-
- // Description: Print current working object
-
- R3PLM_PRINTCURRENT = 260015;
-
- function mR3PLM_PRINTCURRENT() {
- DoA(this.r3obj, 260015, 0, R3TID_INTEGER, 0);
- }
-
- // Description: Make the parent the current working level
- // Returns: Boolean, true if succeeded
-
- R3PLM_PARENT = 260016;
-
- function mR3PLM_PARENT() {
- return DoA(this.r3obj, 260016, 0, R3TID_INTEGER, 0);
- }
-
- // Description: Make the previous object the current working object.
- // Returns: Boolean, true if succeeded
-
- R3PLM_NEXT = 260017;
-
- function mR3PLM_NEXT() {
- return DoA(this.r3obj, 260017, 0, R3TID_INTEGER, 0);
- }
-
- // Description: Make the next object the current working object.
- // Returns: Boolean, true if succeeded
-
- R3PLM_PREV = 260018;
-
- function mR3PLM_PREV() {
- return DoA(this.r3obj, 260018, 0, R3TID_INTEGER, 0);
- }
-
- // Description: Print out class information of the given object.
- // Returns: Boolean, true if object was found
- // p3: String, name of the object to be studied
-
- R3PLM_PRINTCLASS = 260019;
-
- function mR3PLM_PRINTCLASS(p3) {
- return DoA(this.r3obj, 260019, p3, R3TID_STRING, 0);
- }
-
- // Description: Delete given object(s).
- // Returns: Boolean, true if succeeded
- // p3: String, name of the object(s) to be deleted.
-
- R3PLM_REMOVE = 260020;
-
- function mR3PLM_REMOVE(p3) {
- return DoA(this.r3obj, 260020, p3, R3TID_STRING, 0);
- }
-
- // Description: Fetch symbolic name for given id (class id, method id, attribute id.). Class method.
- // Returns: String, string corresponding to the given id.
- // p1: Integer, class id
- // p2: Integer, see R3ITS_ codes below
- // p3: Integer, id to be mapped.
-
- R3PLCM_GETNAMEFORID = 260021;
-
- function mR3PLCM_GETNAMEFORID(p1, p2, p3) {
- return DoA3(this.r3obj, 260021, p1, R3TID_INTEGER, 0, p2, R3TID_INTEGER, 0, p3, R3TID_INTEGER, 0);
- }
-
- // Description: Register function for mapping identifiers to symbolic * names.
- // Returns: String, string corresponding to the given id.
- // p3: Integer, identifier to be mapped
-
- R3PLCM_REGISTERMAPPER = 260022;
-
- function mR3PLCM_REGISTERMAPPER(p3) {
- return DoA(this.r3obj, 260022, p3, R3TID_INTEGER, 0);
- }
-
- // Description: Find scripting class based on given file name extension.
- // p3: String, extension
-
- R3PLCM_FINDCLASSBYEXTENSION = 260023;
-
- function mR3PLCM_FINDCLASSBYEXTENSION(p3) {
- DoA(this.r3obj, 260023, p3, R3TID_STRING, 0);
- }
-
-
-
-
- R3PLA_OutputObj = 260500;
- function SetR3PLA_OutputObj(value) {
- R3Set(this.r3obj, R3PLA_OutputObj, value, R3TID_OBJECT, 0);
- }
-
- function GetR3PLA_OutputObj() {
- return R3ToJS(R3Get(this.r3obj, R3PLA_OutputObj, R3TID_OBJECT, 0));
- }
-
- R3PLA_OutputMth = 260501;
- function SetR3PLA_OutputMth(value) {
- R3Set(this.r3obj, R3PLA_OutputMth, value, R3TID_INTEGER, 0);
- }
-
- function GetR3PLA_OutputMth() {
- return R3Get(this.r3obj, R3PLA_OutputMth, R3TID_INTEGER, 0);
- }
-
- R3PLA_Model = 260503;
- function SetR3PLA_Model(value) {
- R3Set(this.r3obj, R3PLA_Model, value, R3TID_OBJECT, 0);
- }
-
- function GetR3PLA_Model() {
- return R3ToJS(R3Get(this.r3obj, R3PLA_Model, R3TID_OBJECT, 0));
- }
-
- R3PLA_ErrorString = 260504;
- function GetR3PLA_ErrorString() {
- return R3Get(this.r3obj, R3PLA_ErrorString, R3TID_STRING, 0);
- }
-
- R3PLA_Current = 260505;
- function SetR3PLA_Current(value) {
- R3Set(this.r3obj, R3PLA_Current, value, R3TID_STRING, 0);
- }
-
- function GetR3PLA_Current() {
- return R3Get(this.r3obj, R3PLA_Current, R3TID_STRING, 0);
- }
-
- var R3PLA_ErrorCode = 260506; // Integer
- R3PLA_ErrorObj = 260507;
- function SetR3PLA_ErrorObj(value) {
- R3Set(this.r3obj, R3PLA_ErrorObj, value, R3TID_OBJECT, 0);
- }
-
- function GetR3PLA_ErrorObj() {
- return R3ToJS(R3Get(this.r3obj, R3PLA_ErrorObj, R3TID_OBJECT, 0));
- }
-
- R3PLA_ErrorMth = 260508;
- function SetR3PLA_ErrorMth(value) {
- R3Set(this.r3obj, R3PLA_ErrorMth, value, R3TID_INTEGER, 0);
- }
-
- function GetR3PLA_ErrorMth() {
- return R3Get(this.r3obj, R3PLA_ErrorMth, R3TID_INTEGER, 0);
- }
-
- var R3PLERR_INVALIDNAME = 0;
- var R3PLERR_INVALIDATTRIBUTE = 1;
- var R3PLERR_NOMEMORY = 2;
- var R3PLERR_NOTALEVELOBJECT = 3;
- var R3PLERR_NOMODEL = 4;
- var R3PLERR_MAKETAGLIST = 5;
- var R3ITS_ANY = 0;
- var R3ITS_CLID = 1;
- var R3ITS_MTH = 2;
- var R3ITS_ATTR = 3;
-
-
- function r3Prglng () {
- this.base = r3God;
- if(arguments.length) {
- this.base(R3CLID_PRGLNG, arguments);
- }
- // Methods
- this.INTERP=mR3PLM_INTERP;
- this.EVAL=mR3PLM_EVAL;
- this.PRINT=mR3PLM_PRINT;
- this.REGISTERLANGUAGE=mR3CPLM_REGISTERLANGUAGE;
- this.ENUMLANGUAGES=mR3CPLM_ENUMLANGUAGES;
- this.DEFINEVAR=mR3PLM_DEFINEVAR;
- this.SETVAR=mR3PLM_SETVAR;
- this.GETVAR=mR3PLM_GETVAR;
- this.LOAD=mR3PLM_LOAD;
- this.ERROR=mR3PLM_ERROR;
- this.MAKECURRENT=mR3PLM_MAKECURRENT;
- this.GETPUBATTR=mR3PLM_GETPUBATTR;
- this.SETPUBATTR=mR3PLM_SETPUBATTR;
- this.LISTPUBATTRS=mR3PLM_LISTPUBATTRS;
- this.PRINTCURRENT=mR3PLM_PRINTCURRENT;
- this.PARENT=mR3PLM_PARENT;
- this.NEXT=mR3PLM_NEXT;
- this.PREV=mR3PLM_PREV;
- this.PRINTCLASS=mR3PLM_PRINTCLASS;
- this.REMOVE=mR3PLM_REMOVE;
- this.GETNAMEFORID=mR3PLCM_GETNAMEFORID;
- this.REGISTERMAPPER=mR3PLCM_REGISTERMAPPER;
- this.FINDCLASSBYEXTENSION=mR3PLCM_FINDCLASSBYEXTENSION;
-
- // Attributes
- this.GetOutputObj=GetR3PLA_OutputObj;
- this.SetOutputObj=SetR3PLA_OutputObj;
- this.GetOutputMth=GetR3PLA_OutputMth;
- this.SetOutputMth=SetR3PLA_OutputMth;
- this.GetModel=GetR3PLA_Model;
- this.SetModel=SetR3PLA_Model;
- this.GetErrorString=GetR3PLA_ErrorString;
- this.GetCurrent=GetR3PLA_Current;
- this.SetCurrent=SetR3PLA_Current;
- this.GetErrorObj=GetR3PLA_ErrorObj;
- this.SetErrorObj=SetR3PLA_ErrorObj;
- this.GetErrorMth=GetR3PLA_ErrorMth;
- this.SetErrorMth=SetR3PLA_ErrorMth;
- }
-
- r3Prglng.prototype=new r3Root;
- // r3prglng.h_H